package org.example.springmvc.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * ClassName: Hello01Controller
 * Package: org.example.springmvc.controller
 * Description:
 *
 * @Author wanghao
 * @Create 2024-07-11 8:29
 * @Version 1.0
 */
// 3. 指定请求方式
@Controller
@RequestMapping("/hello03")
public class Hello03Controller {

    @RequestMapping(value = "/a", method = {RequestMethod.GET, RequestMethod.PUT})
    public String h01() {
        System.out.println("h03 - a");
        return "succ";
    }

    @PostMapping("/b")
    public String h02() {
        System.out.println("h03 - b");
        return "succ";
    }

    //@RequestMapping(value = "/a", method = {RequestMethod.GET, RequestMethod.PUT})
    public String h03() {
        return "succ";
    }

}
